Method for generating lookup table for color correction for display device

ABSTRACT

A method for generating a lookup table for color correction for a display device includes obtaining measured stimulus values for grayscales of primaries displayed on the display device, obtaining target stimulus values for the grayscales of the primaries, and obtaining the lookup table by comparing the measured stimulus values for the grayscales of the primaries and the target stimulus values for the grayscales of the primaries. The measured display characteristic is employed to calculate the corresponding lookup table for color correction for the display device for achieving a desired color temperature and brightness curve. It makes the adjustment of color temperature and brightness more accurate and quicker, to reduce cost.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to color correction for a display deviceand, more particularly, to a method for generating a lookup table forcolor correction for a display device.

2. Description of the Related Art

In manufacturing display devices such as liquid crystal displays (LCDs),it is generally very difficult for the manufactured display devices tohave identical luminous ratios of red, green and blue primary lightsources. As a result, the manufactured display devices cannot exhibitidentical color performance even though they are manufactured in thesame batch and the same process by the same manufacturer. Thus, themanufactured display devices must undergo a white balance adjustmentbefore they become finished products.

Nowadays, a method for the white balance adjustment commonly used inmanufacturing display devices includes the following steps. First, ahalf-black and half-white image signal is inputted to a display deviceto be adjusted. Next, an instrument is used to measure the imagedisplayed on the display device to obtain deviations of chromaticitycoordinates of bright and dark brightnesses with respect to thechromaticity coordinate of a reference white. Finally, according to thedeviations, gain and offset parameters for the red, green and blueprimary light sources are repeatedly adjusted to change driving voltagesfor the red, green and blue primary light sources to cause the whiteunder the bright and dark brightnesses to be identical to the referencewhite.

However, the above method for the white balance adjustment only adjuststhe white balance under the bright and dark brightnesses and results ininaccurate color temperatures for shades between, but not including, thebright and dark brightnesses, so that the adjusted display devices stillcannot exhibit identical color performance. Moreover, the above methoddoes not provide brightness curve adjustment for the display devices. Inaddition, today, the display devices each generally supports severalvideo interfaces such as a video graphics array (VGA), a digital visualinterface (DVI) and a high-definition multimedia interface (HDMI), andeach video interface typically supports several color temperature modessuch as cool (12000K), normal (9300K) and warm (6500K). If the whitebalance is manually adjusted interface by interface and mode by mode, itwill take a long time for the display devices to adjust the whitebalances.

SUMMARY OF THE INVENTION

Accordingly, a method for generating a lookup table for color correctionfor a display device is provided for quickly and accurately adjustingthe color temperature and the brightness curve of the display device.

According to an aspect of the present invention, a method for generatinga lookup table for color correction for a display device includes:measuring tristimulus values for grayscales and tristimulus values forprimaries displayed on the display device; calculating measured stimulusvalues for the grayscales of the primaries according to the measuredtristimulus values for the grayscales and the measured tristimulusvalues for the primaries; calculating a target maximum luminance valueaccording to a target color temperature value and the measuredtristimulus values for a maximum grayscale; calculating targettristimulus values for the grayscales according to the target maximumluminance value, the target color temperature value and a target gammavalue; calculating target stimulus values for the grayscales of theprimaries according to the target tristimulus values for the grayscalesand the measured tristimulus values for the primaries; when the targetstimulus value for one grayscale of one primary is between measuredstimulus values for two adjacent grayscales of the one primary, using aninterpolation method to calculate a sub-grayscale corresponding to thetarget stimulus value for the one grayscale of the one primary andbetween the two adjacent grayscales of the one primary, rounding thesub-grayscale to be a lookup value and then filling the lookup value ina cell corresponding to the one grayscale of the one primary in thelookup table; when each of the target stimulus values for a minimumgrayscale to one grayscale of one primary is not between measuredstimulus values for two adjacent grayscales of the one primary, settinga lookup value corresponding to the minimum grayscale of the one primaryto be zero, taking a linear relationship between the lookup valuescorresponding to the minimum grayscale of the one primary and agrayscale next to the one grayscale of the one primary, and then fillingin cells corresponding to the minimum grayscale to the one grayscale ofthe one primary in the lookup table.

In one embodiment, calculating the measured stimulus values for thegrayscales of the primaries further includes: modifying the measuredtristimulus values for the grayscales according to the measuredtristimulus values for the maximum grayscale and the measuredtristimulus values for the primaries; and replacing the measuredtristimulus values for the grayscales by the modified measuredtristimulus values for the grayscales.

In one embodiment, before rounding the sub-grayscale to be the lookupvalue, the method further includes: modifying the sub-grayscale to be amodified sub-grayscale by multiplying the sub-grayscale by a gain valueand then adding an offset value; and rounding the modified sub-grayscaleto be a lookup value and then filling the lookup value in the cellcorresponding to the one grayscale of the one primary in the lookuptable.

In one embodiment, the tristimulus values include X, Y and Z stimulusvalues. In alternative embodiments, the tristimulus values are replacedby xyY, Luv or Lab values derived from the X, Y and Z stimulus values.

In one embodiment, the primaries include red, green and blue. Thedisplay device includes an LCD monitor or an LCD television.

The present invention employs the measured display characteristic tocalculate the corresponding lookup table for color correction for thedisplay device for achieving a desired color temperature and brightnesscurve. It makes the adjustment of color temperature and brightness moreaccurate and quicker to reduce cost.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing and other features of the disclosure will be apparent andeasily understood from a further reading of the specification and claimsand by reference to the accompanying drawings in which:

FIGS. 1A and 1B are a flowcharts illustrating a method for generating alookup table for color correction for a display device according to anembodiment of the present invention;

FIG. 2 is a table illustrating the measured tristimulus values for thegrayscales and the measured tristimulus values for the primariesobtained according to the step S11 shown in FIG. 1A;

FIG. 3 is a table illustrating the modified measured tristimulus valuesfor the grayscales obtained according to the step S12 shown in FIG. 1A;

FIG. 4 is a table illustrating the measured stimulus values for thegrayscales of the primaries obtained according to the step S13 shown inFIG. 1A;

FIG. 5 is a table illustrating the target tristimulus values for thegrayscales obtained according to the step S22 shown in FIG. 1A;

FIG. 6 is a table illustrating the target stimulus values for thegrayscales of the primaries obtained according to the step S23 shown inFIG. 1A; and

FIG. 7 is a table illustrating the lookup table for color correction forthe display device obtained according to the step S3 shown in FIG. 1B.

DETAILED DESCRIPTION OF THE INVENTION

In the following embodiments, for convenience of explanation and notintending to be limiting, display devices use red (R), green (G) andblue (B) primaries to produce the other colors by additive color mixing.A color of each pixel of images displayed on display devices isrepresented in a 24-bit RGB value and expressed as a triplet (r, g, b),where r, g and b are red, green and blue components, respectively, andeach component is an 8-bit unsigned integer (i.e. an integer rangingfrom 0 to 255) to provide 256 different shades. The RGB value (i, i, i)represents the i-th shade of gray (hereinafter called grayscale) where iis an integer ranging from 0 to 255. (0, 0, 0) represents the zerothgrayscale or the minimum grayscale (i.e. black). (255, 255, 255)represents the 255th grayscale or the maximum grayscale (i.e. white).The RGB value (i, 0, 0) notated as Ri, represents the i-th shade of red(hereinafter called grayscale of red). (255, 0, 0) or R255 representsthe 255th grayscale of red (i.e. red). The RGB value (0, i, 0), notatedas Gi, represents the i-th shade of green (hereinafter called grayscaleof green). (0, 255, 0) or G255 represents the 255th grayscale of green(i.e. green). The RGB value (0, 0, i), notated as Bi, represents thei-th shade of blue (hereinafter called grayscale of blue). (0, 0, 255)or B255 represents the 255th grayscale of blue (i.e. blue).

FIGS. 1A and 1B are a flowcharts illustrating a method for generating alookup table for color correction for a display device according to anembodiment of the present invention. Referring to FIGS. 1A and 1B, amethod for generating a lookup table for color correction for a displaydevice sequentially includes three major steps S1-S3. The step S1 is toobtain measured stimulus values for the grayscales of the primaries forthe display device. The step S2 is to obtain target stimulus values forthe grayscales of the primaries for the display device. The step S3 isto obtain the lookup table for color correction for the display deviceby comparing the measured stimulus values for the grayscales of theprimaries and the target stimulus values for the grayscales of theprimaries. The display device can use the lookup table to adjust thecolor temperature and the brightness curve of the display device.

In this embodiment, the step S1 sequentially includes steps S11-S13 forobtaining the measured stimulus values for the grayscales of theprimaries for the display device. At the step S11, an instrument is usedto measure corresponding images displayed on the display device tomeasure tristimulus values for the grayscales and tristimulus values forthe primaries to obtain the measured tristimulus values for thegrayscales (X₀″-X₂₅₅″, Y₀″-Y₂₅₅″ and Z₀″-Z₂₅₅″ shown in the upper tablein FIG. 2) and the measured tristimulus values for the primaries(X_(R255), Y_(R255), Z_(R255), X_(G255), Y_(G255), Z_(G255), X_(B255),Y_(B255) and Z_(B255) shown in the lower table in FIG. 2), where thetristimulus values include X, Y and Z stimulus values, the grayscalesinclude the zeroth to the 255th grayscales, and the primaries includered (R255), green (G255) and blue (B255). The measured tristimulusvalues for the grayscales (X₀″-X₂₅₅″, Y₀″-Y₂₅₅″ and Z₀″-Z₂₅₅″) includethe measured tristimulus values for the zeroth grayscale (X₀″, Y₀″ andZ₀″), the measured tristimulus values for the first grayscale (X₁″, Y₁″and Z₁″), . . . , and the measured tristimulus values for the 255thgrayscale (X₂₅₅″, Y₂₅₅″ and Z₂₅₅″). The measured tristimulus values forthe primaries (X_(R255), Y_(R255), Z_(R255), X_(G255), Y_(G255),Z_(G255), X_(B255), Y_(B255) and Z_(B255)) include the measuredtristimulus values for red (X_(R255), Y_(R255) and Z_(R255)), themeasured tristimulus values for green (X_(G255), Y_(G255) and Z_(G255))and the measured tristimulus values for blue (X_(B255), Y_(B255) andZ_(B255)).

According to the principle of additive color mixing, it is ideal thatX₂₅₅″=X_(R255)+X_(G255)+X_(B255), Y₂₅₅″=Y_(R255)+Y_(G255)+Y_(B255) andZ₂₅₅″=Z_(R255)+Z_(G255)+Z_(B255). However, because of observationalerrors or other factors, it is practical thatX₂₅₅″≈X_(R255)+X_(G255)+X_(B255), Y₂₅₅″≈Y_(R255)+Y_(G255)+Y_(B255) andZ₂₅₅″≈Z_(R255)+Z_(G255)+Z_(B255) and, if necessary, they can bemodified. When they need to be modified, at the step S12, according tothe measured tristimulus values for the maximum grayscale (X₂₅₅″, Y₂₅₅″and Z₂₅₅″) and the measured tristimulus values for the primaries(X_(R255), Y_(R255), Z_(R255), X_(G255), Y_(G255), Z_(G255), X_(B255),Y_(B255) and Z_(B255)) the measured tristimulus values for thegrayscales (X₀″-X₂₅₅″, Y₀″-Y₂₅₅″ and Z₀″-Z₂₅₅″) will be modified toobtain the modified measured tristimulus values for the grayscales(X₀-X₂₅₅, Y₀-Y₂₅₅ and Z₀-Z₂₅₅ shown in FIG. 3) which include themodified measured X stimulus values for the grayscales (X₀-X₂₅₅), themodified measured Y stimulus values for the grayscales (Y₀-Y₂₅₅) and themodified measured Z stimulus values for the grayscales (Z₀-Z₂₅₅). In oneembodiment, X₀-X₂₅₅ are obtained by multiplying X₀″-X₂₅₅″ each by afirst modified factor obtained by dividing (X_(R255)+X_(G255)+X_(B255))by X₂₅₅″, Y₀-Y₂₅₅ are obtained by multiplying Y₀″-Y₂₅₅″ each by a secondmodified factor obtained by dividing (Y_(R255)+Y_(G255)+Y_(B255)) byY₂₅₅″, and Z₀-Z₂₅₅ are obtained by multiplying Z₀″-Z₂₅₅″ each by a thirdmodified factor obtained by dividing (Z_(R255)+Z_(G255)+Z_(B255)) byZ₂₅₅″.

At the step S13, according to the modified measured tristimulus valuesfor the grayscales (X₀-X₂₅₅, Y₀-Y₂₅₅ and Z₀-Z₂₅₅ shown in FIG. 3) andthe measured tristimulus values for the primaries (X_(R255), Y_(R255),Z_(R255), X_(G255), Y_(G255), Z_(G255), X_(B255), Y_(B255) and Z_(B255)shown in FIG. 2), the measured stimulus values for the grayscales of theprimaries (X_(R0)-X_(R255), Y_(G0)-Y_(G255) and Z_(B0)-Z_(B255) shown inFIG. 4) are calculated, where the grayscales of the primaries includethe grayscales of red (R0-R255), the grayscales of green (G0-G255) andthe grayscales of blue (B0-B255). The measured stimulus values for thegrayscales of the primaries (X_(R0)-X_(R255), Y_(G0)-Y_(G255) andZ_(B0)-Z_(B255)) include the measured X stimulus values for thegrayscales of red (X_(R0)-X_(R255)), the measured Y stimulus values forthe grayscales of green (Y_(G0)-Y_(G255)) and the measured Z stimulusvalues for the grayscales of blue (Z_(B0)-Z_(B255)).

In one embodiment, the relationship of the modified measured tristimulusvalues for the i-th grayscale (X_(i), Y_(i) and Z_(i), where i is aninteger ranging from 0 to 255) and the measured tristimulus values forthe primaries (X_(R255), Y_(R255), Z_(R255), X_(G255), Y_(G255),Z_(G255), X_(B255), Y_(B255) and Z_(B255)) can be expressed as follows:X _(R255) ×I _(i) +X _(G255) ×J _(i) +X _(B255) ×K _(i) =X _(i)Y _(R255) ×I _(i) +Y _(G255) ×J _(i) +Y _(B255) ×K _(i) =Y _(i)Z _(R255) ×I _(i) +Z _(G255) ×J _(i) +Z _(B255) ×K _(i) =Z _(i)Substituting the values of X_(i), Y_(i), Z_(i) shown in FIG. 3 andX_(R255), X_(G255), X_(B255), Y_(R255), Y_(G255), Y_(B255), Z_(R255),Z_(G255), Z_(B255) shown in FIG. 2 into the above equations and solvingthem simultaneously yield the solutions for I_(i), J_(i) and K_(i).Then, substituting the solutions for I_(i), J_(i) and K_(i) into theformulasX _(Ri) =X _(R255) ×I _(i)Y _(Gi) =Y _(G255) ×J _(i)Z _(Bi) =Z _(B255) ×K _(i)yields the measured X stimulus value for the i-th grayscale of red(X_(Ri)), the measured Y stimulus value for the i-th grayscale of green(Y_(Gi)) and the measured Z stimulus value for the i-th grayscale ofblue (Z_(Bi)), for all i, to obtain the measured stimulus values for thegrayscales of the primaries (X_(R0)-X_(R255), Y_(G0)-Y_(G255) andZ_(B0)-Z_(B255)).

For example, taking the modified measured tristimulus values for the128th grayscale (X₁₂₈, Y₁₂₈ and Z₁₂₈) as an example, they can beexpressed as follows:185.0448×I ₁₂₈+145.8495×J ₁₂₈+111.1191×K ₁₂₈=93.5111498.0262×I ₁₂₈+311.0104×J ₁₂₈+43.58617×K ₁₂₈=95.793207.121009×I ₁₂₈+70.13288×J ₁₂₈+613.829×K ₁₂₈=142.9727Solving the above equations simultaneously yields the solutions:I₁₂₈=0.214873807, J₁₂₈=0.211372809 and K₁₂₈=0.206276337. Then,substituting the solutions I₁₂₈, J₁₂₈ and K₁₂₈ into the above formulasX_(R128)=X_(R255)×I₁₂₈, Y_(G128)=Y_(G255)×J₁₂₈ andZ_(B128)=Z_(B255)×K₁₂₈ yields X_(R128)=39.76128, Y_(G128)=65.73914 andZ_(B128)=126.6184.

In another embodiment, the measured stimulus values for the grayscalesof the primaries (X_(R0)-X_(R255), Y_(G0)-Y_(G255) and Z_(B0)-Z_(B255))can be directly measured by using the instrument to measurecorresponding images displayed on the display device rather thancalculating according to the modified measured tristimulus values forthe grayscales (X₀-X₂₅₅, Y₀-Y₂₅₅ and Z₀-Z₂₅₅) and the measuredtristimulus values for the primaries (X_(R255), Y_(R255), Z_(R255),X_(G255), Y_(G255), Z_(G255), X_(B255), Y_(B255) and Z_(B255)).

In this embodiment, the step S2 sequentially includes steps S21-S23 forobtaining the target stimulus values for the grayscales of the primariesfor the display device. At the step S21, according to a target colortemperature value (corresponding to chromaticity coordinates x and y)and the modified measured tristimulus values for the maximum grayscale(X₂₅₅, Y₂₅₅ and Z₂₅₅ shown in FIG. 3), a target maximum luminance value(L_(MAX)) is calculated. In one embodiment, taking the target colortemperature value corresponding to the chromaticity coordinates x=0.313and y=0.329 as an example, it is assumed that among the modifiedmeasured tristimulus values for the maximum grayscale (X₂₅₅, Y₂₅₅ andZ₂₅₅), the modified measured X stimulus value (X₂₅₅) has the highestluminance, and, then, the assumption is verified. First, according tothe relationship of X, Y and Z stimulus values and x, y and z normalizedstimulus values, the modified measured tristimulus values under theassumption are calculated as follows:X _(MAX) =X ₂₅₅=442.0134Y _(XMAX) =X _(MAX)×(y/x)=442.0134×0.329/0.313=464.6083342Z _(XMAX) =Y_(XMAX)×(1−x−y)/y=464.6083342×(1−0.313−0.329)/0.329=505.5616524Next, the relationship of the modified measured tristimulus values underthe assumption (X_(MAX), Y_(XMAX) and Z_(XMAX)) and the measuredtristimulus values for the primaries (X_(R255), Y_(R255), Z_(R255),X_(G255), Y_(G255), Z_(G255), X_(B255), Y_(B255) and Z_(B255)) can beexpressed as follows:X _(R255) ×U ₂₅₅ +X _(G255) ×V ₂₅₅ +X _(B255) ×W ₂₅₅ =X _(MAX)Y _(R255) ×U ₂₅₅ +Y _(G255) ×V ₂₅₅ +Y _(B255) ×W ₂₅₅ =Y _(XMAX)Z _(R255) ×U ₂₅₅ +Z _(G255) ×V ₂₅₅ +Z _(B255) ×W ₂₅₅ =Z _(XMAX)

Substituting the values of X_(MAX), Y_(XMAX), Z_(XMAX) calculated aboveand X_(R255), X_(G255), X_(B255), Y_(R255), Y_(G255), Y_(B255),Z_(R255), Z_(G255), Z_(B255) shown in FIG. 2 into the above equationsand solving them simultaneously yield the solutions: U₂₅₅=1.160181522,V₂₅₅=1.03116645 and W₂₅₅=0.6923448. Because the value of U₂₅₅ is thegreatest among the values of U₂₅₅, V₂₅₅ and W₂₅₅, the assumption thatthe modified measured X stimulus value (X₂₅₅) has the highest luminanceis correct. However, if the assumption that the modified measured Xstimulus value (X₂₅₅) has the highest luminance is not correct, it ischanged to assume that the modified measured Y stimulus value (Y₂₅₅) hasthe highest luminance, and then the assumption is verified bycalculating U₂₅₅, V₂₅₅ and W₂₅₅ again and judging whether the value ofV₂₅₅ is the greatest. If the assumption that the modified measured Ystimulus value (Y₂₅₅) has the highest luminance is still not correct, itis certain that the modified measured Z stimulus value (Z₂₅₅) has thehighest luminance. The values of U₂₅₅, V₂₅₅ and W₂₅₅ are calculatedagain, and, now, the value of W₂₅₅ is undoubtedly the greatest.

In order to cause the target maximum luminance value (L_(MAX)) to fitwith the maximum luminance value which the display device can achieve inpractice, the values of U₂₅₅, V₂₅₅ and W₂₅₅ should be divided by thegreatest one of the values of U₂₅₅, V₂₅₅ and W₂₅₅ to provide the correctproportions to calculate the target maximum luminance value (L_(MAX)).In this embodiment, the value of U₂₅₅ is the greatest, and the targetmaximum luminance value (L_(MAX)) is expressed as follows:L _(MAX) =Y _(R255)×(U ₂₅₅ /U ₂₅₅)+Y _(G255)×(V ₂₅₅ /U ₂₅₅)+Y _(B255)×(W₂₅₅ /U ₂₅₅)=400.4617599

At the step S22, according to the target maximum luminance value(L_(MAX)), the target color temperature value (corresponding tochromaticity coordinates x and y) and a target gamma value (γ), targettristimulus values for the grayscales (X₀′-X₂₅₅′, Y₀′-Y₂₅₅′ andZ₀′-Z₂₅₅′ shown in FIG. 5) are calculated. In one embodiment, the targettristimulus values for the i-th grayscale (X_(i)′, Y_(i)′ and Z_(i)′,where i is an integer ranging from 0 to 255) are expressed as follows:Y _(i) ′=L _(MAX)×(i/255)^(γ) +Y ₀X _(i) ′=Y _(i) ′×x/yZ _(i) ′=Y _(i)′×(1−x−y)/y

Continuing the above example, taking the target tristimulus values forthe 128th grayscale (X₁₂₈′, Y_(128′)and Z₁₂₈′) as an example, assumingthat the target gamma value γ is 2.2 and substituting the values ofL_(MAX), γ, Y₀, x and y into the above formulas yields:Y ₁₂₈′=400.4617599×(128/255)^(2.2)+0.1073202=88.01657283X ₁₂₈′=88.01657283×0.313/0.329=83.7361316Z ₁₂₈′=88.01657283×(1−0.313−0.329)/0.329=95.77487256

At the step S23, according to the target tristimulus values for thegrayscales (X₀′-X₂₅₅′, Y₀′-Y₂₅₅′ and Z₀′-Z₂₅₅′ shown in FIG. 5) and themeasured tristimulus values for the primaries (X_(R255), Y_(R255),Z_(R255), X_(G255), Y_(G255), Z_(G255), X_(B255), Y_(B255) and Z_(B255)shown in FIG. 2), the target stimulus values for the grayscales of theprimaries (X_(R0)′-X_(R255)′, Y_(G0)′-Y_(G255)′ and Z_(B0)′-Z_(B255)′shown in FIG. 6) are calculated. In one embodiment, the relationship ofthe target tristimulus values for the i-th grayscale (X_(i)′, Y_(i)′ andZ_(i)′, where i is an integer ranging from 0 to 255) and the measuredtristimulus values for the primaries (X_(R255), Y_(R255), Z_(R255),X_(G255), Y_(G255), Z_(G255), X_(B255), Y_(B255) and Z_(B255)) can beexpressed as follows:X _(R255) ×U _(i) +X _(G255) ×V _(i) +X _(B255) ×W _(i) =X _(i)′Y _(R255) ×U _(i) +Y _(G255) ×V _(i) +Y _(B255) ×W _(i) =Y _(i)′Z _(R255) ×U _(i) +Z _(G255) ×V _(i) +Z _(B255) ×W _(i) =Z _(i)′Substituting the values of X_(i)′, Y_(i)′, Z_(i)′ shown in FIG. 5 andX_(R255), X_(G255), X_(B255), Y_(R255), Y_(G255), Y_(B255), Z_(R255),Z_(G255), Z_(B255) shown in FIG. 2 into the above equations and solvingthem simultaneously yield the solutions for U_(i), V_(i) and W_(i).Then, substituting the solutions for U_(i), V_(i) and W_(i) into theformulasX _(Ri) ′=X _(R255) ×U _(i)Y _(Gi) ′=Y _(G255) ×V _(i)Z _(Bi) ′=Z _(B255) ×W _(i)yields the target X stimulus value for the i-th grayscale of red(X_(Ri)′), the target Y stimulus value for the i-th grayscale of green(Y_(Gi′)) and the target Z stimulus value for the i-th grayscale of blue(Z_(Bi′)), for all i, to obtain the target stimulus values for thegrayscales of the primaries (X_(R0)′-X_(R255)′, Y_(G0)′-Y_(G255)′ andZ_(B0)′-Z_(B255)′).

Continuing the above example, taking the target tristimulus values forthe 128th grayscale (X₁₂₈′, Y₁₂₈′ and Z₁₂₈′) as an example, they can beexpressed as follows:185.0448×U ₁₂₈+145.8495×V ₁₂₈+111.1191×W ₁₂₈=83.736131698.0262×U ₁₂₈+311.0104×V ₁₂₈+43.58617×W ₁₂₈=88.016572837.121009×U ₁₂₈+70.13288×V ₁₂₈+613.829×W ₁₂₈=95.77487256Solving the above equations simultaneously yields the solutions:U₁₂₈=0.219787709, V₁₂₈=0.195346769 and W₁₂₈=0.131159542. Then,substituting the solutions U₁₂₈, V₁₂₈ and W₁₂₈ into the above formulasX_(R128)′=X_(R255)×U₁₂₈, Y_(G128)′=Y_(G255)×V₁₂₈ andZ_(B128)′=Z_(B255)×W₁₂₈ yields X_(R128)′=40.67057, Y_(G128)′=60.75488and Z_(B128)′=80.50953.

In this embodiment, the step S3 sequentially includes steps S31-S34 forobtaining the lookup table (shown in FIG. 7) for color correction forthe display device by comparing the measured stimulus values for thegrayscales of the primaries (X_(R0)-X_(R255), Y_(G0)-Y_(G255) andZ_(B0)-Z_(B255) shown in FIG. 4) and the target stimulus values for thegrayscales of the primaries (X_(R0)′-X_(R255)′, Y_(G0)′-Y_(G255)′ andZ_(B0)′-Z_(B255)′ shown in FIG. 6). At the step S31, when the targetstimulus value for one grayscale of one primary is between measuredstimulus values for two adjacent grayscales of the one primary, aninterpolation method is used to calculate a sub-grayscale correspondingto the target stimulus value for the one grayscale of the one primaryand is between the two adjacent grayscales of the one primary. In oneembodiment, the sub-grayscale is rounded (such as rounded off to theinteger) to be a lookup value and then filled in a cell corresponding tothe one grayscale of the one primary in the lookup table. Thesub-grayscale can be further processed, if necessary, to increase dataresolution. In this embodiment, to increase data resolution, at the stepS32, the sub-grayscale is modified to be a modified sub-grayscale bymultiplying the sub-grayscale by a gain value and then adding an offsetvalue. At the step S33, the modified sub-grayscale is rounded (such asrounded off to the integer) to be a lookup value and then filled in acell corresponding to the one grayscale of the one primary in the lookuptable.

Continuing the above example, taking the target stimulus value for the128th grayscale of red (X_(R128)′) as an example, the target stimulusvalue for the 128th grayscale of red (X_(R128)′) is 40.67057 which isbetween 40.50521 (X_(R129)) and 41.26324 (X_(R130)). That is, the targetstimulus value for the 128th grayscale of red (X_(R128)′) is between themeasured stimulus values for the two adjacent grayscales of red(X_(R129) and X_(R130)) where the two adjacent grayscales are of red areR129 and R130. Next, a linear interpolation method is used to calculatea sub-grayscale (about 129.2) corresponding to the target stimulus valuefor the 128th grayscale of red (X_(R128)′) and is between the twoadjacent grayscales of red (R129 and R130). To increase data resolution,the sub-grayscale (129.2) is modified to be a modified sub-grayscale(129.2×4+3=519.8) by multiplying the sub-grayscale (129.2) by a gainvalue (4) and then adding an offset value (3). In this case, the gainvalue (4) can expand the maximum grayscale from the 255th grayscale tothe 1020th grayscale, and, then, the offset value (3) can shift the1020th grayscale to the 1023th grayscale, so that the gain value (4) andthe offset value (3) can increase data resolution of each component of(r, g, b) from an 8-bit unsigned integer (providing the zeroth to the255th grayscales or 256 shades) to a 10-bit unsigned integer (providingthe zeroth to the 1023th grayscales or 1024 shades). Finally, themodified sub-grayscale (519.8) is rounded off to the integer to be alookup value (520) and then filled in a cell corresponding to the 128thgrayscale of red in the lookup table shown in FIG. 7, where the cell isthe intersection of a column of red (R) and a row of the 128thgrayscale.

At the step S34, when the target stimulus values for the minimumgrayscale to one grayscale of one primary each are not between measuredstimulus values for two adjacent grayscales of the one primary, settinga lookup value corresponding to the minimum grayscale of the one primaryto be zero, taking a linear relationship between the lookup valuescorresponding to the minimum grayscale of the one primary and agrayscale next to the one grayscale of the one primary to obtain lookupvalues and then filling in cells corresponding to the minimum grayscaleto the one grayscale of the one primary in the lookup table.

Continuing the above example, taking the target stimulus values for thegrayscales of blue (Z_(B0)′-Z_(B255)′ shown in FIG. 6) as an example,each target stimulus values for the zeroth to the seventh grayscales ofblue (Z_(B0)′-Z_(B7)′) is not between measured stimulus values for twoadjacent grayscales of blue, and each target stimulus values for theseventh to the 255th grayscales of blue (Z_(B8)′- Z_(B255)∝) is betweenmeasured stimulus values for two adjacent grayscales of blue. In thiscase, the lookup value corresponding to the minimum grayscale of blue(B0) is set to be zero, and the lookup value corresponding to thegrayscale next to the seventh grayscale of blue (B8) is 20 obtained fromthe steps S31-S33. Taking a linear relationship between the lookupvalues corresponding to B0 and B8 (i.e. 0 and 20), respectively, obtainslookup values corresponding to B0 and B7 (i.e. 0, 2, 5, 8, 10, 12, 15and 18). Then, the lookup values corresponding to B0 and B7 are filledin cells corresponding to B0 and B7 in the lookup table.

Furthermore, in one embodiment, the present invention stores themeasured tristimulus values for the grayscales (X₀″-X₂₅₅″, Y₀″-Y₂₅₅″ andZ₀″-Z₂₅₅″) and the measured tristimulus values for the primaries(X_(R255), Y_(R255), Z_(R255), X_(G255), Y_(G255), Z_(G255), X_(B255),Y_(B255) and Z_(B255)) obtained from the step S11 in a storage unit(such as an EEPROM) of the display device, and implements the steps S12,S13, S2 and S3 by a program which can be executed by a processor of thedisplay device. It results in reduced storage space for storing data forcolor correction and adjustable gamma value (γ) and color temperaturevalue (corresponding to chromaticity coordinates x and y).

In summary, the present invention uses the measured displaycharacteristic to calculate the corresponding lookup table for colorcorrection for the display device for achieving a desired colortemperature and brightness curve. It makes the adjustment of colortemperature and brightness more accurate and quicker, to reduce cost.

It will be apparent to those skilled in the art that variousmodifications and variations can be made to the structure of the presentinvention without departing from the scope or spirit of the invention.In view of the foregoing, it is intended that the present inventioncover modifications and variations of this invention provided they fallwithin the scope of the following claims and their equivalents.

I claim:
 1. A method for generating a lookup table for color correctioncomprising: measuring tristimulus values for grayscales and tristimulusvalues for primaries displayed on a display device; storing the measuredtristimulus values for the grayscales and the measured tristimulusvalues for the primaries in a storage unit of the display device;calculating measured stimulus values for the grayscales of the primariesaccording to the measured tristimulus values for the grayscales and themeasured tristimulus values for the primaries in a processor of thedisplay device; calculating a target maximum luminance value accordingto a target color temperature value and the measured tristimulus valuesfor a maximum grayscale in the processor; calculating target tristimulusvalues for the grayscales according to the target maximum luminancevalue, the target color temperature value and a target gamma value inthe processor; calculating target stimulus values for the grayscales ofthe primaries according to the target tristimulus values for thegrayscales and the measured tristimulus values for the primaries in theprocessor; and when the target stimulus value for one grayscale of oneprimary is between measured stimulus values for two adjacent grayscalesof the one primary, the processor using an interpolation method tocalculate a sub-grayscale corresponding to the target stimulus value forthe one grayscale of the one primary and between the two adjacentgrayscales of the one primary, rounding the sub-grayscale to be a lookupvalue and then filling the lookup value in a cell corresponding to theone grayscale of the one primary in the lookup table.
 2. The methodaccording to claim 1, wherein when each of the target stimulus valuesfor a minimum grayscale to the one grayscale of the one primary is notbetween measured stimulus values for the two adjacent grayscales of theone primary, the processor setting a lookup value corresponding to theminimum grayscale of the one primary to be zero, taking a linearrelationship between the lookup values corresponding to the minimumgrayscale of the one primary and a grayscale next to the one grayscaleof the one primary, and then filling in cells corresponding to theminimum grayscale to the one grayscale of the one primary in the lookuptable.
 3. The method according to claim 1, wherein calculating themeasured stimulus values for the grayscales of the primaries in theprocessor further comprises: modifying the measured tristimulus valuesfor the grayscales according to the measured tristimulus values for themaximum grayscale and the measured tristimulus values for the primaries;and replacing the measured tristimulus values for the grayscales by themodified measured tristimulus values for the grayscales.
 4. The methodaccording to claim 1, wherein before rounding the sub-grayscale to bethe lookup value, further comprising: modifying the sub-grayscale to bea modified sub-grayscale by multiplying the sub-grayscale by a gainvalue and then adding an offset value in the processor; and rounding themodified sub-grayscale to be a lookup value and then filling the lookupvalue in the cell corresponding to the one grayscale of the one primaryin the lookup table.
 5. The method according to claim 1, wherein theprimaries comprise red, green and blue.
 6. The method according to claim1, wherein the tristimulus values comprise X, Y and Z stimulus values.7. The method according to claim 6, wherein the tristimulus values arereplaced by xyY, Luv or Lab values derived from the X, Y and Z stimulusvalues.
 8. The method according to claim 1, wherein the display devicecomprises a liquid crystal display (LCD) monitor or an LCD television.9. A method for generating a lookup table for color correctioncomprising: measuring tristimulus values for grayscales and tristimulusvalues for primaries displayed on a display device; storing the measuredtristimulus values for the grayscales and the measured tristimulusvalues for the primaries in a storage unit of the display device;calculating measured stimulus values for the grayscales of the primariesaccording to the measured tristimulus values for the grayscales and themeasured tristimulus values for the primaries in a processor of thedisplay device; calculating a target maximum luminance value accordingto a target color temperature value and the measured tristimulus valuesfor a maximum grayscale in the processor; calculating target tristimulusvalues for the grayscales according to the target maximum luminancevalue, the target color temperature value and a target gamma value inthe processor; calculating target stimulus values for the grayscales ofthe primaries according to the target tristimulus values for thegrayscales and the measured tristimulus values for the primaries in theprocessor; and when each of the target stimulus values for a minimumgrayscale to one grayscale of one primary is not between measuredstimulus values for two adjacent grayscales of the one primary, theprocessor setting a lookup value corresponding to the minimum grayscaleof the one primary to be zero, taking a linear relationship between thelookup values corresponding to the minimum grayscale of the one primaryand a grayscale next to the one grayscale of the one primary, and thenfilling in cells corresponding to the minimum grayscale to the onegrayscale of the one primary in the lookup table.
 10. The methodaccording to claim 9, wherein when the target stimulus value for onegrayscale of one primary is between measured stimulus values for twoadjacent grayscales of the one primary, the processor using aninterpolation method to calculate a sub-grayscale corresponding to thetarget stimulus value for the one grayscale of the one primary andbetween the two adjacent grayscales of the one primary, rounding thesub-grayscale to be a lookup value and then filling the lookup value ina cell corresponding to the one grayscale of the one primary in thelookup table.
 11. The method according to claim 10, wherein beforerounding the sub-grayscale to be the lookup value in the processor,comprising: modifying the sub-grayscale to be a modified sub-grayscaleby multiplying the sub-grayscale by a gain value and then adding anoffset value; and rounding the modified sub-grayscale to be a lookupvalue and then filling the lookup value in the cell corresponding to theone grayscale of the one primary in the lookup table.
 12. The methodaccording to claim 9, wherein calculating the measured stimulus valuesfor the grayscales of the primaries in the processor further comprises:modifying the measured tristimulus values for the grayscales accordingto the measured tristimulus values for the maximum grayscale and themeasured tristimulus values for the primaries; and replacing themeasured tristimulus values for the grayscales by the modified measuredtristimulus values for the grayscales.
 13. The method according to claim9, wherein the primaries comprise red, green and blue.
 14. The methodaccording to claim 9, wherein the tristimulus values comprise X, Y and Zstimulus values.
 15. The method according to claim 14, wherein thetristimulus values are replaced by xyY, Luv or Lab values derived fromthe X, Y and Z stimulus values.
 16. The method according to claim 9,wherein the display device comprises a liquid crystal display (LCD)monitor or an LCD television.